-- GENERATED SPELL FOR [Addled Leper] --


function spell0_6221(pUnit, Event) --@Battle Stance,Self--
pUnit:FullCastSpellOnTarget(7165,pUnit)
pUnit:RegisterEvent('Sorts_6221', 622, 1)
end

function spell1_6221(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(9080,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6221', 10301, 1)
end

function spell2_6221(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(2055,pUnit)
pUnit:RegisterEvent('Sorts_6221', 3000, 1)
end

function spell3_6221(pUnit, Event) --@Heroic Strike,n/a--
pUnit:FullCastSpellOnTarget(25712,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6221', 615, 1)
end

function spell4_6221(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6221', 619, 1)
end

function Sorts_6221(pUnit, Event)
local choix_sorts_6221 = math.random(0, 4)
if choix_sorts_6221 == 0 then
pUnit:RegisterEvent('spell0_6221', 1, 1)
end
if choix_sorts_6221 == 1 then
pUnit:RegisterEvent('spell1_6221', 1, 1)
end
if choix_sorts_6221 == 2 then
pUnit:RegisterEvent('spell2_6221', 1, 1)
end
if choix_sorts_6221 == 3 then
pUnit:RegisterEvent('spell3_6221', 1, 1)
end
if choix_sorts_6221 == 4 then
pUnit:RegisterEvent('spell4_6221', 1, 1)
end
end

function mob6221_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_6221', math.random(1500, 3000), 1)
end

function mob6221_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6221_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6221_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(6221, 1, 'mob6221_Action')
RegisterUnitEvent(6221, 2, 'mob6221_Leave')
RegisterUnitEvent(6221, 3, 'mob6221_Kill')
RegisterUnitEvent(6221, 4, 'mob6221_Die')
